home *** CD-ROM | disk | FTP | other *** search
-
- {
- Picasso96 - Include by Andreas "Wurzelsepp" <:-) Neumann
-
-
- für Picasso96API-Library von Alexander Kneer & Tobias Abt ab Version 1.18
-
- basierend auf den Original-Includes von A. Kneer & T. Abt
-
- letzte Bearbeitung : 31.06.1997
-
- Linkeraufruf : blink MyProgram.o lib PCQ.Lib,P96.lib to MyProgram
-
- dieses Includefile darf frei kopiert werden, solange alle Hinweise
- enthalten bleiben
- }
-
- {$I "Include:exec/nodes.i" }
-
- {$I "Include:utility/tagitem.i" }
-
- {$I "Include:intuition/intuition.i" }
-
-
- Var
- P96Base : Address;
-
- { ************************************************************************ }
- { This is the name of the library }
-
- Const
- P96NAME : String = "Picasso96API.library";
-
- { ************************************************************************ }
- { Types for RGBFormat used }
-
- Type
- RGBFTYPE = (
- RGBFB_NONE, { no valid RGB format (should not happen) }
- RGBFB_CLUT, { palette mode, set colors when opening screen using
- tags or use SetRGB32/LoadRGB32(...) }
- RGBFB_R8G8B8, { TrueColor RGB (8 bit each) }
- RGBFB_B8G8R8, { TrueColor BGR (8 bit each) }
- RGBFB_R5G6B5PC, { HiColor16 (5 bit R, 6 bit G, 5 bit B),
- format: gggbbbbbrrrrrggg }
- RGBFB_R5G5B5PC, { HiColor15 (5 bit each), format: gggbbbbb0rrrrrgg }
- RGBFB_A8R8G8B8, { 4 Byte TrueColor ARGB (A unused alpha channel) }
- RGBFB_A8B8G8R8, { 4 Byte TrueColor ABGR (A unused alpha channel) }
- RGBFB_R8G8B8A8, { 4 Byte TrueColor RGBA (A unused alpha channel) }
- RGBFB_B8G8R8A8, { 4 Byte TrueColor BGRA (A unused alpha channel) }
- RGBFB_R5G6B5, { HiColor16 (5 bit R, 6 bit G, 5 bit B),
- format: rrrrrggggggbbbbb }
- RGBFB_R5G5B5, { HiColor15 (5 bit each), format: 0rrrrrgggggbbbbb }
- RGBFB_B5G6R5PC, { HiColor16 (5 bit R, 6 bit G, 5 bit B),
- format: gggrrrrrbbbbbggg }
- RGBFB_B5G5R5PC, { HiColor15 (5 bit each), format: gggrrrrr0bbbbbbgg }
-
- { By now, the following formats are for use with a hardware window only
- (bitmap operations may be implemented incompletely) }
-
- RGBFB_Y4U2V2, { 2 Byte TrueColor YUV (CCIR recommendation CCIR601).
- Each two-pixel unit is stored as one longword
- containing luminance (Y) for each of the two pixels,
- and chrominance (U,V) for alternate pixels.
- The missing chrominance values are generated by
- interpolation. (Y1-U0-Y0-V0) }
- RGBFB_Y4U1V1, { 1 Byte TrueColor ACCUPAK. Four adjacent pixels form
- a packet of 5 bits Y (luminance) each pixel and 6 bits
- U and V (chrominance) shared by the four pixels }
-
- RGBFB_MaxFormats
- );
-
- Const
-
- RGBFF_NONE = %00000000000000000000000000000001;
- RGBFF_CLUT = %00000000000000000000000000000010;
- RGBFF_R8G8B8 = %00000000000000000000000000000100;
- RGBFF_B8G8R8 = %00000000000000000000000000001000;
- RGBFF_R5G6B5PC = %00000000000000000000000000010000;
- RGBFF_R5G5B5PC = %00000000000000000000000000100000;
- RGBFF_A8R8G8B8 = %00000000000000000000000001000000;
- RGBFF_A8B8G8R8 = %00000000000000000000000010000000;
- RGBFF_R8G8B8A8 = %00000000000000000000000100000000;
- RGBFF_B8G8R8A8 = %00000000000000000000001000000000;
- RGBFF_R5G6B5 = %00000000000000000000010000000000;
- RGBFF_R5G5B5 = %00000000000000000000100000000000;
- RGBFF_B5G6R5PC = %00000000000000000001000000000000;
- RGBFF_B5G5R5PC = %00000000000000000010000000000000;
- RGBFF_Y4U2V2 = %00000000000000000100000000000000;
- RGBFF_Y4U1V1 = %00000000000000001000000000000000;
-
-
- { ************************************************************************ }
- { Attributes for p96GetBitMapAttr }
-
- Const
- P96BMA_WIDTH = 0;
- P96BMA_HEIGHT = 1;
- P96BMA_DEPTH = 2;
- P96BMA_MEMORY = 3;
- P96BMA_BYTESPERROW = 4;
- P96BMA_BYTESPERPIXEL = 5;
- P96BMA_BITSPERPIXEL = 6;
- P96BMA_RGBFORMAT = 7;
- P96BMA_ISP96 = 8;
-
-
- { ************************************************************************ }
- { Attributes for p96GetModeIDAttr }
-
- Const
-
- P96IDA_WIDTH = 0;
- P96IDA_HEIGHT = 1;
- P96IDA_DEPTH = 2;
- P96IDA_BYTESPERPIXEL = 3;
- P96IDA_BITSPERPIXEL = 4;
- P96IDA_RGBFORMAT = 5;
- P96IDA_ISP96 = 6;
- P96IDA_BOARDNUMBER = 7;
- P96IDA_STDBYTESPERROW = 8;
-
-
-
- { ************************************************************************ }
- { Tags for p96BestModeIDTagList }
-
- Const
- P96BIDTAG_Dummy = TAG_USER + 96;
-
- P96BIDTAG_FormatsAllowed = P96BIDTAG_Dummy + $0001;
- P96BIDTAG_FormatsForbidden = P96BIDTAG_Dummy + $0002;
- P96BIDTAG_NominalWidth = P96BIDTAG_Dummy + $0003;
- P96BIDTAG_NominalHeight = P96BIDTAG_Dummy + $0004;
- P96BIDTAG_Depth = P96BIDTAG_Dummy + $0005;
-
- { ************************************************************************ }
- { Tags for p96RequestModeIDTagList }
-
- Const
- P96MA_Dummy = TAG_USER + $10000 + 96;
-
- P96MA_MinWidth = P96MA_Dummy + $0001;
- P96MA_MinHeight = P96MA_Dummy + $0002;
- P96MA_MinDepth = P96MA_Dummy + $0003;
- P96MA_MaxWidth = P96MA_Dummy + $0004;
- P96MA_MaxHeight = P96MA_Dummy + $0005;
- P96MA_MaxDepth = P96MA_Dummy + $0006;
- P96MA_DisplayID = P96MA_Dummy + $0007;
- P96MA_FormatsAllowed = P96MA_Dummy + $0008;
- P96MA_FormatsForbidden = P96MA_Dummy + $0009;
- P96MA_WindowTitle = P96MA_Dummy + $000a;
- P96MA_OKText = P96MA_Dummy + $000b;
- P96MA_CancelText = P96MA_Dummy + $000c;
- P96MA_Window = P96MA_Dummy + $000d;
- P96MA_PubScreenName = P96MA_Dummy + $000e;
- P96MA_Screen = P96MA_Dummy + $000f;
-
- { *********************************************************************** }
- { Tags for p96OpenScreenTagList }
-
- Const
- P96SA_Dummy = TAG_USER + $20000 + 96;
- P96SA_Left = P96SA_Dummy + $0001;
- P96SA_Top = P96SA_Dummy + $0002;
- P96SA_Width = P96SA_Dummy + $0003;
- P96SA_Height = P96SA_Dummy + $0004;
- P96SA_Depth = P96SA_Dummy + $0005;
- P96SA_DetailPen = P96SA_Dummy + $0006;
- P96SA_BlockPen = P96SA_Dummy + $0007;
- P96SA_Title = P96SA_Dummy + $0008;
- P96SA_Colors = P96SA_Dummy + $0009;
- P96SA_ErrorCode = P96SA_Dummy + $000a;
- P96SA_Font = P96SA_Dummy + $000b;
- P96SA_SysFont = P96SA_Dummy + $000c;
- P96SA_Type = P96SA_Dummy + $000d;
- P96SA_BitMap = P96SA_Dummy + $000e;
- P96SA_PubName = P96SA_Dummy + $000f;
- P96SA_PubSig = P96SA_Dummy + $0010;
- P96SA_PubTask = P96SA_Dummy + $0011;
- P96SA_DisplayID = P96SA_Dummy + $0012;
- P96SA_DClip = P96SA_Dummy + $0013;
- P96SA_ShowTitle = P96SA_Dummy + $0014;
- P96SA_Behind = P96SA_Dummy + $0015;
- P96SA_Quiet = P96SA_Dummy + $0016;
- P96SA_AutoScroll = P96SA_Dummy + $0017;
- P96SA_Pens = P96SA_Dummy + $0018;
- P96SA_SharePens = P96SA_Dummy + $0019;
- P96SA_BackFill = P96SA_Dummy + $001a;
- P96SA_Colors32 = P96SA_Dummy + $001b;
- P96SA_VideoControl = P96SA_Dummy + $001c;
- P96SA_RGBFormat = P96SA_Dummy + $001d;
- P96SA_NoSprite = P96SA_Dummy + $001e;
- P96SA_NoMemory = P96SA_Dummy + $001f;
- P96SA_RenderFunc = P96SA_Dummy + $0020;
- P96SA_SaveFunc = P96SA_Dummy + $0021;
- P96SA_UserData = P96SA_Dummy + $0022;
- P96SA_Alignment = P96SA_Dummy + $0023;
- P96SA_FixedScreen = P96SA_Dummy + $0024;
- P96SA_Exclusive = P96SA_Dummy + $0025;
-
- { ************************************************************************ }
-
- Const
- MODENAMELENGTH = 48;
-
- Type
- P96Mode = Record
- Node : Node;
- Description : Array [0..MODENAMELENGTH-1] Of Char;
- Width : Short;
- Height : Short;
- Depth : Short;
- DisplayID : Integer;
- End;
-
-
- { ************************************************************************ }
- { Structure to describe graphics data }
-
- Type
- RenderInfo = Record
- Memory : Address;
- BytesPerRow : Short;
- pad : Short;
- RGBFormat : RGBFTYPE;
- End;
-
-
- { ************************************************************************ }
- { Structure for p96WriteTrueColorData() and p96ReadTrueColorData() }
-
- Type
- TrueColorInfo = Record
- PixelDistance,
- BytesPerRow : Integer;
- RedData,
- GreenData,
- BlueData : ^Address;
- End;
-
-
- { ************************************************************************ }
- { Tags for PIPs }
-
- Const
-
- P96PIP_Dummy = TAG_USER + $30000 + 96;
- P96PIP_SourceFormat = P96PIP_Dummy+1; { RGBFTYPE (I) }
- P96PIP_SourceBitMap = P96PIP_Dummy+2; { struct BitMap * (G) }
- P96PIP_SourceRPort = P96PIP_Dummy+3; { struct RastPort * (G) }
- P96PIP_SourceWidth = P96PIP_Dummy+4; { ULONG (I) }
- P96PIP_SourceHeight = P96PIP_Dummy+5; { ULONG (I) }
-
-
- Function p96OpenScreenTagList (Tags : ^TagItem) : ScreenPtr;
- External;
-
- Procedure p96CloseScreen (pScreen : ^Screen);
- External;
-
- Function p96AllocModeListTagList (Tags: ^TagItem) : ListPtr;
- External;
-
- Procedure p96FreeModeList (ModeList: ^List);
- External;
-
- Function p96GetModeIDAttr (DisplayID, attribute_number : Integer) : Integer;
- External;
-
- Function p96AllocBitMap (SizeX, SizeY, Depth, Flags : Integer; friend_bitmap: BitMapPtr; RGBFormat: RGBFTYPE) : BitMapPtr;
- External;
-
- Procedure p96FreeBitMap (bm : BitMapPtr);
- External;
-
- Function p96GetBitMapAttr (bm : BitMapPtr; attribute_number : Integer) : Integer;
- External;
-
- Function p96LockBitMap (bm : BitMapPtr; buf : ^Byte; size : Integer) : Integer;
- External;
-
- Procedure p96UnlockBitMap (bm : BitMapPtr; Lock: Integer);
- External;
-
- Procedure p96WritePixelArray (ri : ^RenderInfo; SrcX, SrcY : Short; rp : RastPortPtr; DestX, DestY, SizeX, SizeY : Short);
- External;
-
- Procedure p96ReadPixelArray (ri : ^RenderInfo; DestX, DestY : Short; rp : RastPortPtr; SrcX, SrcY, SizeX, SizeY : Short);
- External;
-
- Procedure p96WritePixel (rp : RastPortPtr; x, y : Short; color : Integer);
- External;
-
- Function p96ReadPixel (rp : RastPortPtr; x, y : Short) : Integer;
- External;
-
- Procedure p96RectFill (rp : RastPortPtr; MinX, MinY, MaxX, MaxY : Short; ARGB : Integer);
- External;
-
- Procedure p96WriteTrueColorData (tci : ^TrueColorInfo; SrcX, SrcY : Short; rp : RastPortPtr; DestX, DestY, SizeX, SizeY : Short);
- External;
-
- Procedure p96ReadTrueColorData (tci : ^TrueColorInfo; DestX, DestY : Short; rp : RastPortPtr; SrcX, SrcY, SizeX, SizeY : Short);
- External;
-
- Function p96PIP_OpenTagList (Tags : ^TagItem) : WindowPtr;
- External;
-
- Procedure p96PIP_Close (pWindow : WindowPtr);
- External;
-
- Function p96PIP_SetTagList (pWindow : WindowPtr; Tags : ^TagItem) : Integer;
- External;
-
- Procedure p96PIP_GetTagList (pWindow : WindowPtr; Tags : ^TagItem);
- External;
-
- Function p96PIP_GetIMsg (pPort : MsgPortPtr) : IntuiMessagePtr;
- External;
-
- Procedure p96PIP_ReplyIMsg (pIntuiMessage : IntuiMessagePtr);
- External;
-
- Function p96BestModeIDTagList (Tags : ^TagItem) : Integer;
- External;
-
- Function p96RequestModeIDTagList (Tags : ^TagItem) : Integer;
- External;
-
-
-